
<!DOCTYPE html>
<html lang="en" class="loading">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>Django启动 - Mr.Song</title>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="google" content="notranslate" />
    <meta name="keywords" content="Fechin,"> 
    <meta name="description" content="将项目所需的依赖导入.txt中pip freeze &amp;gt; requirements.txt
将项目requirements.txt文件中项目的依赖安装好pip install -i https:,"> 
    <meta name="author" content="Mr.Song"> 
    
    <link rel="icon" href="/song_b/img/song.png"> 
    
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">

    
<link rel="stylesheet" href="/song_b/css/diaspora.css">

	<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({
              google_ad_client: "ca-pub-8691406134231910",
              enable_page_level_ads: true
         });
    </script>
    <script async custom-element="amp-auto-ads"
        src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js">
    </script>
<meta name="generator" content="Hexo 4.2.0"></head>

<body class="loading">
    <span id="config-title" style="display:none">Mr.Song</span>
    <div id="loader"></div>
    <div id="single">
    <div id="top" style="display: block;">
    <div class="bar" style="width: 0;"></div>
    <a class="iconfont icon-home image-icon" href="javascript:;" data-url="https://gitee.com/song_shen_olympic/song_b.git"></a>
    <div title="播放/暂停" class="iconfont icon-play"></div>
    <h3 class="subtitle">Django启动</h3>
    <div class="social">
        <div>
            <div class="share">
                <a title="获取二维码" class="iconfont icon-scan" href="javascript:;"></a>
            </div>
            <div id="qr"></div>
        </div>
    </div>
    <div class="scrollbar"></div>
</div>

    <div class="section">
        <div class="article">
    <div class='main'>
        <h1 class="title">Django启动</h1>
        <div class="stuff">
            <span>四月 21, 2020</span>
            
  <ul class="post-tags-list" itemprop="keywords"><li class="post-tags-list-item"><a class="post-tags-list-link" href="/song_b/tags/python/" rel="tag">python</a></li></ul>


        </div>
        <div class="content markdown">
            <h1 id="将项目所需的依赖导入-txt中"><a href="#将项目所需的依赖导入-txt中" class="headerlink" title="将项目所需的依赖导入.txt中"></a>将项目所需的依赖导入.txt中</h1><h5 id="pip-freeze-gt-requirements-txt"><a href="#pip-freeze-gt-requirements-txt" class="headerlink" title="pip freeze &gt; requirements.txt"></a>pip freeze &gt; requirements.txt</h5><hr>
<h1 id="将项目requirements-txt文件中项目的依赖安装好"><a href="#将项目requirements-txt文件中项目的依赖安装好" class="headerlink" title="将项目requirements.txt文件中项目的依赖安装好"></a>将项目requirements.txt文件中项目的依赖安装好</h1><h5 id="pip-install-i-https-pypi-tuna-tsinghua-edu-cn-simple-r-requirements-txt"><a href="#pip-install-i-https-pypi-tuna-tsinghua-edu-cn-simple-r-requirements-txt" class="headerlink" title="pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt"></a>pip install -i <a href="https://pypi.tuna.tsinghua.edu.cn/simple" target="_blank" rel="noopener">https://pypi.tuna.tsinghua.edu.cn/simple</a> -r requirements.txt</h5><hr>
<h1 id="数据库迁移"><a href="#数据库迁移" class="headerlink" title="数据库迁移"></a>数据库迁移</h1><h5 id="python-manage-py-makemigrations"><a href="#python-manage-py-makemigrations" class="headerlink" title="python manage.py makemigrations"></a>python manage.py makemigrations</h5><h5 id="python-manage-py-migrate"><a href="#python-manage-py-migrate" class="headerlink" title="python manage.py migrate"></a>python manage.py migrate</h5><h1 id="Django启动命令"><a href="#Django启动命令" class="headerlink" title="Django启动命令"></a>Django启动命令</h1><h5 id="python-manage-py-runserver"><a href="#python-manage-py-runserver" class="headerlink" title="python manage.py runserver"></a>python manage.py runserver</h5><p><img src="/hugo_blog/c771720dbd691b331bcad9a158f499aa.jpg" alt="每日一图"></p>

            <!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->
            <audio id="audio" loop="1" preload="auto" controls="controls" data-autoplay="true">
                <source type="audio/mpeg" src="">
            </audio>
            
                <ul id="audio-list" style="display:none">
                    
                        
                            <li title='0' data-url='/song_b//img/002.mp3'></li>
                        
                    
                </ul>
            
        </div>
        
    <div id='gitalk-container' class="comment link"
		data-enable='true'
        data-ae='true'
        data-ci=''
        data-cs=''
        data-r=''
        data-o=''
        data-a=''
        data-d='false'
    >查看评论</div>


    </div>
    
        <div class='side'>
			<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#将项目所需的依赖导入-txt中"><span class="toc-number">1.</span> <span class="toc-text">将项目所需的依赖导入.txt中</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#pip-freeze-gt-requirements-txt"><span class="toc-number">1.0.0.0.1.</span> <span class="toc-text">pip freeze &gt; requirements.txt</span></a></li></ol></li></ol></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#将项目requirements-txt文件中项目的依赖安装好"><span class="toc-number">2.</span> <span class="toc-text">将项目requirements.txt文件中项目的依赖安装好</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#pip-install-i-https-pypi-tuna-tsinghua-edu-cn-simple-r-requirements-txt"><span class="toc-number">2.0.0.0.1.</span> <span class="toc-text">pip install -i https:&#x2F;&#x2F;pypi.tuna.tsinghua.edu.cn&#x2F;simple -r requirements.txt</span></a></li></ol></li></ol></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#数据库迁移"><span class="toc-number">3.</span> <span class="toc-text">数据库迁移</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#python-manage-py-makemigrations"><span class="toc-number">3.0.0.0.1.</span> <span class="toc-text">python manage.py makemigrations</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#python-manage-py-migrate"><span class="toc-number">3.0.0.0.2.</span> <span class="toc-text">python manage.py migrate</span></a></li></ol></li></ol></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Django启动命令"><span class="toc-number">4.</span> <span class="toc-text">Django启动命令</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#python-manage-py-runserver"><span class="toc-number">4.0.0.0.1.</span> <span class="toc-text">python manage.py runserver</span></a></li></ol></li></ol></li></ol></li></ol></li></ol>	
        </div>
    
</div>


    </div>
</div>
</body>

<script src="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>


<script src="//lib.baomitu.com/jquery/1.8.3/jquery.min.js"></script>
<script src="/song_b/js/plugin.js"></script>
<script src="/song_b/js/typed.js"></script>
<script src="/song_b/js/diaspora.js"></script>


<link rel="stylesheet" href="/song_b/photoswipe/photoswipe.css">
<link rel="stylesheet" href="/song_b/photoswipe/default-skin/default-skin.css">


<script src="/song_b/photoswipe/photoswipe.min.js"></script>
<script src="/song_b/photoswipe/photoswipe-ui-default.min.js"></script>


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>
    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">
        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>
        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">
            <div class="pswp__top-bar">
                <!--  Controls are self-explanatory. Order can be changed. -->
                <div class="pswp__counter"></div>
                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
                <button class="pswp__button pswp__button--share" title="Share"></button>
                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>
            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>
            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>
            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>
        </div>
    </div>
</div>






</html>
